/**
 * 
 */
package com.dream.house.dao.impl;

import java.util.List;

import cn.com.servyou.base.exception.DAOException;

import com.dream.house.dao.BuildDAO;
import com.dream.house.dao.base.HouseBaseDAO;
import com.dream.house.entity.BuildDTO;

/**
 * @author ahk
 * @since 1.0
 */
public class BuildDAOImpl extends HouseBaseDAO implements BuildDAO {

	/* (non-Javadoc)
	 * @see com.dream.house.dao.BuildDAO#saveBuild(com.dream.house.entity.BuildDTO)
	 */
	@Override
	public boolean saveBuild(BuildDTO build) throws DAOException {
		
		return createEntity("saveBuild", build);
	}

	/* (non-Javadoc)
	 * @see com.dream.house.dao.BuildDAO#updateBuild(com.dream.house.entity.BuildDTO)
	 */
	@Override
	public boolean updateBuild(BuildDTO dto) throws DAOException {
		
		return updateEntity("updateBuild", dto);
	}

	/* (non-Javadoc)
	 * @see com.dream.house.dao.BuildDAO#removeBuild(String)
	 */
	@Override
	public boolean removeBuild(String id) throws DAOException {

		return removeEntity("removeBuild", id);
	}

	/* (non-Javadoc)
	 * @see com.dream.house.dao.BuildDAO#findBuilds(java.util.Map)
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<BuildDTO> findBuilds(BuildDTO dto)
			throws DAOException {
		
		return (List<BuildDTO>)getEntitys("findBuilds", dto);
	}

	/* (non-Javadoc)
	 * @see com.dream.house.dao.BuildDAO#getBuild(String)
	 */
	@Override
	public BuildDTO getBuild(String id) throws DAOException {
		
		return (BuildDTO)getEntity("getBuild",id);
	}

	/* (non-Javadoc)
	 * @see cn.com.servyou.base.dao.BaseDAO#getEntityName()
	 */
	@Override
	public String getEntityName() {
		return BuildDTO.class.getCanonicalName();
	}
	
}
